#include <stdio.h>
#include <string.h>                     //strcmp strlen函数的头文件
int change(char* arr1, char* arr2)
{
	int len = strlen(arr1);             //进行循环需要知道整个字符串的长度
	int i = 0;
	for (i = 0; i < len; i++)           
	{
		int tmp = arr1[0];              //将首字符存到临时变量中
		int j = 0;
		for (j = 0; j < len - 1;j++)    
		{
			arr1[j] = arr1[j + 1];
		}
		arr1[len - 1] = tmp;        
		if (strcmp(arr1, arr2) == 0)    //比较两个字符串是否相等
		{
			return 1;
		}
	}
	return 0;
}
int main()
{
	char arr1[] = "abcdef";
	char arr2[] = "efabcd";
	int ret = change(arr1, arr2);
	printf("%d\n", ret);
	return 0;
}